/*
 * File:   Message.h
 * Author: henrya
 *
 * Created on June 26, 2009, 4:15 PM
 */

#ifndef _MESSAGE_H
#define	_MESSAGE_H

class Message {
public:

    enum MessageType {
        SYSTEM, ROUTING, SIMPLE
    };
public:
    Message();
    Message(MessageType type);
    virtual ~Message();
    MessageType getType() const;
    virtual void* getMessage() = 0;
    void setFrom(int from);
    void setTo(int to);
    int getFrom();
    int getTo();
    void setSN(unsigned int sn);
    unsigned int getSN() const;
    void incHop();
    unsigned int getCurrentHop();
    void setFinalDest(int dest);
    int getFinalDest();
private:
    MessageType type;
    int from;
    int to;
    unsigned int sn;
    unsigned int hops;
    int finalDest;
};

#endif	/* _MESSAGE_H */

